<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理页面</title>
<link href="{webroot}theme/admin/css/iframe.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/admin/css/iconfont.css" rel="stylesheet" type="text/css" />
<script src="{webroot}lib/js/jquery.js"></script>
<script src="{webroot}lib/js/jquery-migrate-1.1.0.min.js"></script>
<script src="{webroot}lib/js/base.js"></script>
<script src="{webroot}lib/tips/jquery.tips.js"></script>
<script src="{webroot}lib/js/jquery.vtip.js"></script>
<script src="{webroot}lib/validator/jquery.validator.js"></script>
<script src="{webroot}lib/validator/zh_CN.js"></script>
<script src="{webroot}theme/admin/js/admin.js"></script>
<script src="{webroot}lib/dialog/artdialog.js"></script>
<!--[if lt IE 9]>
<script src="{webroot}lib/js/html5.js"></script>
<![endif]-->
<script>
$(function(){
	$(".del").click(function(){
		var id;
		var that=this;
		id=$(this).attr("rel");
			top.dialog({
				content:'\u786e\u5b9a\u8981\u5220\u9664\uff1f\u4e0d\u53ef\u6062\u590d\uff01',
				ok:function(){
					var url,data;
					url='?act=del&id='+id;
					$.ajax({
					type:"get",
					cache:false,
					url:url,
					success:function(_)
					{
						if(_.substring(0,1)==0)
						{
							$.fn.tips({type:"error",content:_.substring(1)});
						}
						else
						{
							$.fn.tips({type:"ok",content:"\u5220\u9664\u6210\u529f"});
							$(that).parent().parent().fadeOut('slow');
						}
					}
					});
									
					},
				cancel:true 
			}).showModal();
		
		})		
})
</script>
</head>
<body>

<div class="layout-center">
	<div class="right_subject">当前位置：栏目 > <a href="?">表单管理</a></div>
    <div class="right_body">
        <div class="nav_menu">
            <ul>
                <li><a href="?act=add"><span class="iconfont">&#xe618;</span>添加表单</a></li>
            </ul>
        </div>
        
        <div class="table_title">
        表单列表
        </div>
        <table id="tablelist">
            <thead>
                <tr>
                    <th width="40">ID</th>
                    <th>表单名称</th>
                    <th width="150">数据表</th>
                    <th width="80">外部提交</th>
                    <th width="80">验证码</th>
                    <th width="60">状态</th>
                    <th width="160">调用链接</th>
                    <th width="200">管理</th>
                </tr>
            </thead>
            <tbody>
            {sdcms:rs top="0" table="sd_form" order="id desc"}
            {rs:eof}
            <tr>
                <td colspan="8">没有资料</td>
            </tr>
            {/rs:eof}
            <tr>
                <td>{$rs[id]}</td>
                <td class="txt_left">{$rs[title]}　[<a href="{webroot}plug/form.asp?id={$rs[id]}" target="_blank"><b>前台访问</b></a>]</td>
                <td>{$rs[tablename]}</td>
                <td>{sdcms.iif($rs[ispost]=0,"<span>禁止</span>","启用")}</td>
                <td>{sdcms.iif($rs[iscode]=0,"<span>禁止</span>","启用")}</td>
                <td>{sdcms.iif($rs[islock]=0,"<span>锁定</span>","正常")}</td>
                <td><input type="text" value="{webroot}plug/form.asp?id={$rs[id]}" class="ordnum"></td>
                <td><a href="?act=list&id={$rs[id]}">数据列表</a>　<a href="sd_form_field.asp?act=field&formid={$rs[id]}">字段管理</a>　<a href="?act=edit&id={$rs[id]}">编辑</a>　<a href="javascript:;" class="del" rel="{$rs[id]}">删除</a></td>
            </tr>
            {/sdcms:rs}            
        </table>
    </div>
</div>
</body>
</html>